package com.szzg10.webservice.chapter3;

import java.io.FileOutputStream;
import java.io.IOException;

import com.szzg10.webservice.chapter3.wsimport.skiImage.SkiImageService;
import com.szzg10.webservice.chapter3.wsimport.skiImage.SkiImageServiceService;

public class SkiImageClient {

	private static final String filePath = "d:/temp";
	private static final String fileName = "1.jpg";
	
	public static void main(String[] args) throws IOException {
		
		SkiImageServiceService service = new SkiImageServiceService();
		SkiImageService port = service.getSkiImageServicePort();
		
		byte[] bytes = port.getImage(fileName);
		FileOutputStream out = new FileOutputStream(filePath + "/" + fileName);
		
		out.write(bytes);
		out.close();
	}
}
